//
//  XSImageRatioView.h
//  AudioVideo
//
//  Created by xueshan1 on 2019/9/25.
//  Copyright © 2019 xueshan1. All rights reserved.
//

#import <UIKit/UIKit.h>


@interface XSImageRatio : NSObject

@property(nonatomic,assign)CGFloat ratio;
@property(nonatomic,assign)BOOL isLandscape;
@property(nonatomic,copy)NSString *titleFormat;

- (instancetype)initWithWidth:(CGFloat)width height:(CGFloat)height;


@end

@interface XSImageRatioView : UIView

@property (nonatomic, strong) XSImageRatio *ratio;

- (instancetype)initWithFrame:(CGRect)frame
                        image:(UIImage *)image
                       target:(id)target
                       action:(SEL)action NS_DESIGNATED_INITIALIZER;

- (void)refreshViews;

- (void)changeOrientation;


@end

//toolBar
@interface XSImageRatioToolBarView : UIView

@property(nonatomic,strong)XSImageRatioView *selectedRatioView;
@property(nonatomic,strong)XSImageRatio *selectRatio;
@property(nonatomic,strong)void (^currentSelectRatioBlock)(XSImageRatio *ratio);

- (instancetype)initWithFrame:(CGRect)frame iconImage:(UIImage *)iconImage;


@end


